package controller.services.impl.admin;

import model.interfaces.DAOFactory;
import model.interfaces.admin.AdminDAO;
import model.vos.admin.Admin;
import controller.services.interfaces.JsfGenericService;
import controller.services.interfaces.admin.AdminService;

public class JsfAdminService extends JsfGenericService<Admin> implements
		AdminService {
	
	public JsfAdminService() {
		
	}

	@Override
	public String login(Admin admin, String login, String senha) {
		DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.HIBERNATE);
		AdminDAO adminDAO = daoFactory.getAdminDAO();
		String result = adminDAO.login(admin, login, senha);
		return result;
	}

	@Override
	public Admin loginAdmin(Admin admin, String login, String senha) {
		DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.HIBERNATE);
		AdminDAO adminDAO = daoFactory.getAdminDAO();
		Admin result = adminDAO.loginAdmin(admin, login, senha);
		return result;
	}

	

}
